package com.wain.enums;

public enum RegexEnum {
    //group1 = group2
    GET_METHOD("GET_METHOD","/\\*\\*\\s*(\\*\\s.*\\s*){0,}\\*/\\s*public\\s+[^\\s]+\\s+get\\w*\\([^\\)]*\\)\\s*\\{\\s*return\\s+[\\w|\\.]+;\\s+\\}","public\\s+[^\\s]+\\s+get(\\w*)\\([^\\)]*\\)\\s*\\{\\s*return\\s+([\\w|\\.]+);\\s+\\}"),
    //group1 = group3 && group2 = group4
    SET_METHOD("SET_METHOD","/\\*\\*\\s*(\\*\\s.*\\s*){0,}\\*/\\s*public\\s+[^\\s]+\\s+set\\w*\\([^\\)]*\\)\\s*\\{\\s*\\w*\\.\\w+\\s*=\\s*\\w*;\\s*}","public\\s+[^\\s]+\\s+set(\\w*)\\(([^\\)]*)\\)\\s*\\{\\s*(\\w*\\.\\w+)\\s*=\\s*(\\w*);\\s*}"),
    //group1 = group2
    GET_FINAL_METHOD("GET_FINAL_METHOD","/\\*\\*\\s*(\\*\\s.*\\s*){0,}\\*/\\s*public\\s+final\\s+[^\\s]+\\s+get\\w*\\([^\\)]*\\)\\s*\\{\\s*return\\s+[\\w|\\.]+;\\s+\\}","public\\s+final\\s+[^\\s]+\\s+get(\\w*)\\([^\\)]*\\)\\s*\\{\\s*return\\s+([\\w|\\.]+);\\s+\\}"),
    //group1 = group3 && group2 = group4
    SET_FINAL_METHOD("SET_FINAL_METHOD","/\\*\\*\\s*(\\*\\s.*\\s*){0,}\\*/\\s*public\\s+final\\s+[^\\s]+\\s+set\\w*\\([^\\)]*\\)\\s*\\{\\s*\\w*\\.\\w+\\s*=\\s*\\w*;\\s*}","public\\s+final\\s+[^\\s]+\\s+set(\\w*)\\(([^\\)]*)\\)\\s*\\{\\s*(\\w*\\.\\w+)\\s*=\\s*(\\w*);\\s*}"),
    ;

    private String name;
    private String regex;
    private String regex_child;

    RegexEnum(String name, String regex, String regex_child) {
        this.name = name;
        this.regex = regex;
        this.regex_child = regex_child;
    }

    public String getName() {
        return name;
    }

    public String getRegex() {
        return regex;
    }

    public String getRegex_child() {
        return regex_child;
    }
}
